﻿@model SuperiorModel.ShopRoleAccountModel
@{
    Layout = null;
    var roles = ViewBag.Roles;
}
<link href="~/layui/css/layui.css" rel="stylesheet" />

<link href="~/Content/extend.css" rel="stylesheet" />

<script src="~/scripts/jquery-1.10.2.js"></script>
<script src="~/scripts/Common/Base.js"></script>
<script src="~/scripts/Common/RequestManager.js"></script>
<script src="~/scripts/Common/ToolManager.js"></script>
<script src="~/scripts/layer/layer.js"></script>
<script src="~/layui/layui.js"></script>
<div class="layui">
    <div class="shopmain">
        <div class="layui-card">
            <div class="layui-card-header">账号添加/修改</div>
            <div class="layui-card-body">
                <div class="layui-form" action="">
                    <div class="layui-form-item">
                        <label for="Account" class="layui-form-label">
                            账号
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <input type="text" id="Account" name="Account" lay-verify="required" class="layui-input" value="@Model.Account" placeholder="请输入员工账号">
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label for="Password" class="layui-form-label">
                            密码
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <input type="password" value="@Model.PassWord" id="Password" name="Password" lay-verify="required" class="layui-input" placeholder="请输入密码">
                        </div>

                    </div>

                   
                    <div class="layui-form-item">
                        <label for="RoleId" class="layui-form-label">
                            选择角色
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <select name="RoleId" id="RoleId">
                                <option value="">请选择</option>
                                @foreach (var item in roles)
                                {
                                    if (item.Id == Model.RoleId)
                                    {
                                        <option selected="selected" value="@item.Id">@item.RoleName</option>
                                    }
                                    else
                                    {
                                        <option value="@item.Id">@item.RoleName</option>
                                    }

                                }
                            </select>
                        </div>
                       
                    </div>
                  

                </div>

            </div>
        </div>
    </div>
</div>

<script>
    layui.use('form', function () {
        var form = layui.form;
        form.render();
    });

</script>

